







Algorithms..::IndicesOfMany<(Of <T>)> Method (IList<(Of <T>)>, IEnumerable<(Of <T>)>, BinaryPredicate<(Of <T>)>) |
See Also |
![]() ![]() |
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Enumerates the indices of all the items in a list equal to one of several given items. The passed
BinaryPredicate is used to determine if two items are "equal".
Namespace: Wintellect.PowerCollections
Assembly:
PowerCollections (in PowerCollections.dll)
Syntax
C# |
---|
public static IEnumerable<int> IndicesOfMany<T>( IList<T> list, IEnumerable<T> itemsToLookFor, BinaryPredicate<T> predicate ) |
Visual Basic (Declaration) |
---|
Public Shared Function IndicesOfMany(Of T) ( _ list As IList(Of T), _ itemsToLookFor As IEnumerable(Of T), _ predicate As BinaryPredicate(Of T) _ ) As IEnumerable(Of Integer) |
Visual C++ |
---|
public: generic<typename T> static IEnumerable<int>^ IndicesOfMany ( IList<T>^ list, IEnumerable<T>^ itemsToLookFor, BinaryPredicate<T>^ predicate ) |
Parameters
- list
- IList<(Of <T>)>
The list to search.
- itemsToLookFor
- IEnumerable<(Of <T>)>
A collection of items to search for.
- predicate
- BinaryPredicate<(Of <T>)>
The BinaryPredicate used to compare items for "equality".
Return Value
An IEnumerable<T> that enumerates the indices of items "equal" to any of the items in the collection itemsToLookFor, using as the test for equality.
Type Parameters
- T
Remarks
Since an arbitrary BinaryPredicate is passed to this function, what is being removed need not be true equality. This methods finds
last item X which satisfies BinaryPredicate(X,Y), where Y is one of the items in itemsToLookFor
See Also
Algorithms Class
Wintellect.PowerCollections Namespace